agent: @U0AJM7X8FBR make a tiny change to any bug you can find in the tasks rep#70
agent: @U0AJM7X8FBR make a tiny change to any bug you can find in the tasks rep#70sweetmantech wants to merge 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThe changes introduce a retry mechanism for polling scraper results with a configurable maximum retry threshold, transitioning from simple warnings to structured retry handling. A new logging utility function standardizes step-based logging with configurable log levels across the application. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
src/polling/pollScraperResults.ts
Outdated
| retryCounts.set(run.runId, retries); | ||
|
|
||
| if (retries >= MAX_POLL_RETRIES) { | ||
| logger.error("Max retries reached for scraper result, marking as FAILED", { runId: run.runId, retries }); |
There was a problem hiding this comment.
replace this logger with logStep the existing function lib used in multiple tasks in the tasks repo @recoup-coding-agent
There was a problem hiding this comment.
PRs Updated
Reply in this thread to give feedback.
[Merge All PRs]
|
Got your feedback. Updating the PRs... |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/polling/pollScraperResults.ts (1)
37-53: Minor: Inconsistent key naming in log details.Line 41 uses
retrieswhile line 52 usesretryfor the same value. Consider using consistent naming for easier log aggregation and filtering.♻️ Suggested fix for consistency
- logStep("poll-scraper", "Failed to get scraper result", { runId: run.runId, retry: retries }, "warn"); + logStep("poll-scraper", "Failed to get scraper result", { runId: run.runId, retries }, "warn");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/polling/pollScraperResults.ts` around lines 37 - 53, The log detail keys are inconsistent: one logStep call uses "retries" while another uses "retry"; update the logStep calls in pollScraperResults (the block that updates retryCounts for run.runId and checks MAX_POLL_RETRIES) to use a single consistent key name (pick "retries" everywhere) so both the max-retries error log and the intermediate warn log include { runId: run.runId, retries } for uniform aggregation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/polling/pollScraperResults.ts`:
- Around line 37-53: The log detail keys are inconsistent: one logStep call uses
"retries" while another uses "retry"; update the logStep calls in
pollScraperResults (the block that updates retryCounts for run.runId and checks
MAX_POLL_RETRIES) to use a single consistent key name (pick "retries"
everywhere) so both the max-retries error log and the intermediate warn log
include { runId: run.runId, retries } for uniform aggregation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 361c38fe-df1b-412c-9711-9b64a8a0f02f
📒 Files selected for processing (2)
src/polling/pollScraperResults.tssrc/utils/logStep.ts
There was a problem hiding this comment.
remove this file @recoup-coding-agent in favor of the existing logStep function file in the tasks codebase.
Automated PR from coding agent.
Summary by CodeRabbit